from pygame.sprite import DirtySprite
import pygame
import copy

class ScoreLine(DirtySprite):
	def __init__(self, image, name, score, size, location):
		DirtySprite.__init__(self)

		self.image = copy.copy(image)
		self.rect = self.image.get_rect()
		self.rect.x, self.rect.y = location


		if pygame.font:
			font = pygame.font.Font(None, size)
			text = font.render(score + "         " + name, 1, (10, 10, 10))
			self.image.blit(text, (size / 2, (self.rect.height - size / 2) / 2))
